﻿<Window x:Class="CPPEI.Coolzon.UI.PetroleumDataPartLib.XProperty.Editors.FeatureLayEditWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:CPPEI.Coolzon.UI.PetroleumDataPartLib.XProperty.Editors"
        xmlns:lib="clr-namespace:CPPEI.Coolzon.UI.PetroleumDataPartLib"
        xmlns:ui="clr-namespace:CPPEI.Coolzon.UI;assembly=CPPEI.Coolzon.UI"
        mc:Ignorable="d"
        Title="图层" Height="300" Width="600" Topmost="True" ShowInTaskbar="False" WindowStartupLocation="CenterScreen"  Loaded="Window_Loaded"
        Style="{DynamicResource WindowStyle}">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="35"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Style="{DynamicResource ButtonPanelBackground}" Grid.Row="0" Orientation="Horizontal">
            <Button Name="_ctlAdd" Style="{DynamicResource AddButtonStyle}" FontSize="15" VerticalContentAlignment="Center" Width="36" Margin="3" ToolTip="增加" Click="_ctlAdd_Click"/>
            <Button Name="_ctlRemove" Style="{DynamicResource RemoveButtonStyle}" FontSize="15" Width="36" Margin="3" ToolTip="删除" Click="_ctlRemove_Click"/>
        </StackPanel>
        <ListView x:Name="_ctlLV" Grid.Row="1">
            <ListView.ItemTemplate>
                <DataTemplate DataType="{x:Type lib:FeatureLayer}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="5*"/>
                            <ColumnDefinition Width="Auto"/>
                            <ColumnDefinition Width="*"/>
                        </Grid.ColumnDefinitions>
                        <TextBlock Text="Url" Grid.Column="0" Margin="3,6,3,3" />
                        <TextBox Grid.Column="1" Width="400" Margin="3" Text="{Binding Path=Url, Mode=TwoWay}" GotFocus="TextBox_GotFocus"/>
                        <TextBlock Text="LayerID" Grid.Column="2" Margin="3,6,3,3" />
                        <ui:IntegerTextbox Grid.Column="3" Width="80" Margin="3" Text="{Binding Path=LayerId, Mode=TwoWay}" GotFocus="TextBox_GotFocus">
                        </ui:IntegerTextbox>
                    </Grid>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
        <Grid Grid.Row="2">
            <StackPanel Margin="5" Orientation="Horizontal" HorizontalAlignment="Center">
                <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}" Content="确定" Margin="0,0,20,0" Click="Button_Click" Width="75" />
                <Button Style="{DynamicResource  SubmitOrCancelButtonStyle}" Name="cancel" Content="取消" Margin="20,0,0,0" Click="cancel_Click" Width="75"></Button>
            </StackPanel>
        </Grid>
    </Grid>
</Window>
